﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Groovy_IM.Assets.EnumStructs
{
    public struct UserInfo
    {
        /// <summary>
        /// The user's screenname
        /// </summary>
        public string ScreenName;
        /// <summary>
        /// The user's current warning level
        /// </summary>
        public ushort WarningLevel;
        /// <summary>
        /// The user's class
        /// </summary>
        public UserClass Class;
        /// <summary>
        /// The user's account creation time, in UNIX time_t format
        /// </summary>
        public uint CreateTime;
        /// <summary>
        /// The user's signon time, in UNIX time_t format
        /// </summary>
        public uint SignonTime;
        /// <summary>
        /// The user's idle time, in minutes
        /// </summary>
        public ushort IdleTime;
        /// <summary>
        /// The time when this account was registered ("Member Since"), in UNIX time_t format
        /// </summary>
        public uint RegisterTime;
        /// <summary>
        /// The user's status -- ICQ only
        /// </summary>
        public uint UserStatus;	// enum?
        /// <summary>
        /// The user's external IP address -- ICQ only
        /// </summary>
        public uint ExternalIPAddress;
        // public UserDCInfo DC;
        /// <summary>
        /// The remote client's capability list
        /// </summary>
        public Capabilities ClientCapabilities;
        /// <summary>
        /// The user's online time, in seconds
        /// </summary>
        public uint OnlineTime;
        /// <summary>
        /// The user's buddy icon information
        /// </summary>
        public IconInfo Icon;
        /// <summary>
        /// The user's "available" message -- used by iChat
        /// </summary>
        public string AvailableMessage;
        /// <summary>
        /// The encoding of the user's "available" message
        /// </summary>
        public string AvailableMessageEncoding;
    }
    /// <summary>
    /// Describes an AOL user's class
    /// </summary>
    public enum UserClass
    {
        /// <summary>
        /// Unconfirmed user
        /// </summary>
        Unconfirmed = 0x0001,
        /// <summary>
        /// AOL adminstrator
        /// </summary>
        Administrator = 0x0002,
        /// <summary>
        /// AOL staff
        /// </summary>
        AOLStaff = 0x0004,
        /// <summary>
        /// Commercial account
        /// </summary>
        Commercial = 0x0008,
        /// <summary>
        /// Non-commercial account
        /// </summary>
        Free = 0x0010,
        /// <summary>
        /// User is away
        /// </summary>
        Away = 0x0020,
        /// <summary>
        /// ICQ user
        /// </summary>
        ICQ = 0x0040,
        /// <summary>
        /// AOL Wireless user
        /// </summary>
        Wireless = 0x0080
    }

    /// <summary>
    /// Describes a request for user information, one block at a time
    /// </summary>
    /// <remarks>The BasicUserInfoRequest members cannot be ORed together. To request more
    /// than one type of information at a time, use the <see cref="UserInfoRequest"/> enumeration
    /// with the <see cref="Session.RequestUserInfo"/> method</remarks>
    public enum BasicUserInfoRequest
    {
        /// <summary>
        /// General information -- the user's profile
        /// </summary>
        GeneralInfo = 0x0001,
        /// <summary>
        /// Online information -- a <see cref="UserInfo"/> block
        /// </summary>
        OnlineInfo = 0x0002,
        /// <summary>
        /// Away message
        /// </summary>
        AwayMessage = 0x0003,
        /// <summary>
        /// Client capabilities
        /// </summary>
        Capabilities = 0x0004
    }

    /// <summary>
    /// Describes a multi-part request for user information
    /// </summary>
    /// <remarks>The UserInfoRequest members can be ORed together</remarks>
    public enum UserInfoRequest
    {
        /// <summary>
        /// User's profile
        /// </summary>
        UserProfile = 0x00000001,
        /// <summary>
        /// User's away message
        /// </summary>
        AwayMessage = 0x00000002,
        /// <summary>
        /// Remote client's capabilities
        /// </summary>
        Capabilities = 0x00000004
    }

    /// <summary>
    /// Encapsulates information about a buddy icon
    /// </summary>
    public class IconInfo
    {
        /// <summary>
        /// The icon's ID
        /// </summary>
        public ushort ID;
        /// <summary>
        /// Icon usage flags
        /// </summary>
        public byte Flags;
        /// <summary>
        /// The MD5 hash of the icon
        /// </summary>
        public byte[] Hash;
    }
}